﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CrudApp
{
    public partial class EditForm : Form
    {
        public EditForm()
        {
            InitializeComponent();
        }
        public int idFromEditForm = 0;
        public string fnameFromEditForm = null;
        public string lnameFromEditForm = null;
        public int ageFromEditForm = 0;

        private void OkButton_Click(object sender, EventArgs e)
        {
            commitData();
        }

        void commitData()
        {
            idFromEditForm = Convert.ToInt32(IdTextBox.Text);
            fnameFromEditForm = FNameTextBox.Text;
            lnameFromEditForm = LNameTextBox.Text;
            ageFromEditForm = Convert.ToInt32(AgeTextBox.Text);
        }
    }
}
